transpose
Utility for transposing multi-dimensional data See the API Documentation for more details.
transpose
is #![no_std]
Example
// Create a 2D array in row-major order: the rows of our 2D array are contiguous,
// and the columns are strided
let input_array = vec!;
// Treat our 6-element array as a 2D 3x2 array, and transpose it to a 2x3 array
let mut output_array = vec!;
transpose;
// The rows have become the columns, and the columns have become the rows
let expected_array = vec!;
assert_eq!;
Compatibility
The transpose
crate requires rustc 1.26 or greater.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.